package com.tutu.commons.clients;

import com.tutu.commons.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Program: b2c-cloud-store
 * @Description: 调用类别服务的接口
 * @Author: JK.TuTu
 * @ @Version: 1.0
 * @Create: 2022-12-15 11:03
 **/
@FeignClient("category-service")
public interface CategoryClient {

    /**
     * 根据类别名称获取类别信息
     *
     * @param categoryName 类别名称
     * @return 返回结果实体对象
     */
    @GetMapping("/category/promo/{categoryName}")
    R getCategoryByName(@PathVariable("categoryName") String categoryName);

    /**
     * 获取所有商品分类信息
     *
     * @return 返回校验结果集
     */
    @GetMapping("/category/getAll")
    R getAll();
}
